import React, {Component, PropTypes} from 'react';
import Icons from '../icons/icons.js';
import './bar.scss';


class Bar extends Component {

  static propTypes = {
    parent: PropTypes.string,
    sub: PropTypes.string,
    iconType: PropTypes.string,
  };

  static defaultProps = {
    parent: '',
    sub: '',
    iconType: 'account',//一共有4种：account,distribution,finance,product
  }

  render() {
    const iconClass = 'sprite sprite-icon-dis-backend-nav-'+this.props.iconType+'_01';
    return (
      <div className='paper'>
        <Icons klass={iconClass}></Icons>       
        <div className='b-text'>
          <span className='b-divide'>/</span>
          <span className='b-parent'>{this.props.parent}</span>
          <span className='b-divide'>/</span>
          <span className='b-sub'>{this.props.sub}</span>
        </div>
      </div>
    );
  }

}

export default Bar;